﻿using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace Journeo_backend.Models.Domain
{
    [Table("travel_plans")]
    public class TravelPlan
    {
        [Key]
        public long PlanId { get; set; }

        [Required]
        public long UserId { get; set; }

        [Required]
        [MaxLength(100)]
        public string PlanName { get; set; }

        public DateTime? StartDate { get; set; }

        public DateTime? EndDate { get; set; }

        [Required]
        public string Status { get; set; } = "draft";

        public string? TravelersInfo { get; set; }

        public decimal? Budget { get; set; }

        public string? GptAnalysis { get; set; }

        public DateTime CreatedAt { get; set; } = DateTime.Now;

        public DateTime UpdatedAt { get; set; } = DateTime.Now;

        [ForeignKey("UserId")]
        public User? User { get; set; }

        public ICollection<PlanAttraction>? PlanAttractions { get; set; }
        public ICollection<TransportationPlan>? TransportationPlans { get; set; }
    }
}
